<html>
<head>
	<title></title>
	<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div class="demo">
<?php

$username = $_POST["username"];
$password = $_POST["password"];

$con = mysql_connect("localhost","root","");

	if(!$con)
		{
			die('Could not connect: ' . mysql_error());
		}
	
mysql_select_db("accidorm_database", $con);

$result = mysql_query("SELECT * FROM admin WHERE username='".$username."' and password='".$password."'");

if($row = mysql_fetch_array($result)){
?>
Login Successful.<br/>
<a href="administratorPage.php"><input type="button" value="Proceed"/></a>
<?php
}else{
?>
Login Failed.<br/>
<a href="loginPage.php"><input type="button" value="Back to Login"/></a>
<?php
}
mysql_close($con);
?>

</div>
</body>
</html>